package com.nbatch.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {


    @GetMapping("/hello")
    public String hello() {
        return "hello controller";
    }

    //使用 全局配置文件里的值
    @Autowired
    Book book;

    @GetMapping("/getvalues")
    public String getvalues() {

        return book.toString();
    }


}
